package softtech.app.secretcaller;

import java.util.ArrayList;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class AdapterSlidingMenu extends BaseAdapter{
	
	ArrayList<String> listNameMenu;
	
	Context mContext;
	
	public AdapterSlidingMenu(Context context){
		mContext = context;
		listNameMenu = new ArrayList<String>();
		listNameMenu.add(mContext.getResources().getString(R.string.action_settings));
		listNameMenu.add(mContext.getResources().getString(R.string.title_contact_list));
		//listNameMenu.add(mContext.getResources().getString(R.string.title_call_list));
		//listNameMenu.add(mContext.getResources().getString(R.string.title_sms_list));
		listNameMenu.add(mContext.getResources().getString(R.string.rate_app));
	}

	@Override
	public int getCount() {

		return listNameMenu.size();
	}

	@Override
	public Object getItem(int position) {
		return listNameMenu.get(position);
	}

	@Override
	public long getItemId(int position) {

		return position;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		LayoutInflater inflater = LayoutInflater.from(parent.getContext());
		convertView = inflater.inflate(R.layout.item_slide_menu,parent, false);
		
		TextView tvMenuName = (TextView) convertView.findViewById(R.id.tvMenuName);
		tvMenuName.setText(listNameMenu.get(position));
		
		return convertView;
	}
	
	
	
}
